import request from "@/utils/request";

// 轮播获取
export function getSwiperList() {
  return request({
    url: "/swiper/list",
  });
}

// 新增轮播
export function swiperAdd(data) {
  return request({
    url: "/swiper",
    method: "post",
    data,
  });
}

// 修改状态
export function changeStatus(id, status) {
  return request({
    url: "/swiper/status",
    method: "put",
    data: { status, id },
  });
}

// 修改轮播
export function swiperEdit(data) {
  return request({
    url: "/swiper",
    method: "put",
    data,
  });
}

// 删除轮播
export function swiperDel(id) {
  return request({
    url: "/swiper/" + id,
    method: "delete",
  });
}
